package com.csap.framework.apidoc.example;

/**
 * @author yangchengfu
 * @description 打折
 * @dataTime 2021年-03月-19日 13:54:00
 **/
public class CashRebate extends CashSuper {
    private double moneyRebate = 1;

    public CashRebate(String moneyRebate) {
        //打折收费，初始化时，必须输入折扣率,如八折，就是0.8
        this.moneyRebate = Double.valueOf(moneyRebate);
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
